import { request } from '@umijs/max';

// 获取文章label列表
export async function label_list(params: any) {
  return request<API.ReqResult>(`/api/article_label`, {
    method: 'GET',
    params,
  });
}
// 添加文章label
export async function add_label(body: any) {
  return request<API.ReqResult>(`/api/article_label`, {
    method: 'POST',
    data: body,
  });
}

// 删除文章label
export async function del_label(body: any) {
  return request<API.ReqResult>(`/api/article_label`, {
    method: 'DELETE',
    data: body,
  });
}
// 列表实体
export async function entities_list(params: any) {
  return request<API.ReqResult>(`/api/article_entity_list`, {
    method: 'GET',
    params,
  });
}
// 增加实体
export async function add_entity(body: any) {
  return request<API.ReqResult>(`/api/article_entity`, {
    method: 'POST',
    data: body,
  });
}

// 删除实体
export async function del_entity(body: any) {
  return request<API.ReqResult>(`/api/article_entity`, {
    method: 'DELETE',
    data: body,
  });
}

//确认文章完成
export async function articleConfirm(body: any) {
  return request<API.ReqResult>(`/api/article/confirm`, {
    method: 'POST',
    data: body,
  });
}
//回退到清洗
export async function articleReclean(body: any) {
  return request<API.ReqResult>(`/api/article/reclean`, {
    method: 'POST',
    data: body,
  });
}

// 查询全部领域
export async function domains(params: any) {
  return request<API.ReqResult>(`/api/domains`, {
    method: 'GET',
    params,
  });
}
